#! /usr/bin/env python

import cloud

def createMaster():
    HVM = { 'memory':'256', 'vcpu':'2', 'img':'/srv/cloud/iceblue/image/image_base/webPaaS_master_base.img', 'count':1 }
    ret = cloud.create_vm(HVM)
    ip = ret[0][1]
    return ip

def createSlave():
    HVM = { 'memory':'256', 'vcpu':'2', 'img':'/srv/cloud/iceblue/image/image_base/webPaaS_slave_base.img', 'count':1 }
    ret = cloud.create_vm(HVM)
    ip = ret[0][1]
    return ip
